home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Tools & Apps / Graphics & Imaging / SLUDGE 2.0 / Source Code / Parasite_Manager.a next >
Encoding:
Text File  |  1990-09-14  |  2.1 KB  |  50 lines  |  [TEXT/MPS ]

  1.                         INCLUDE                'traps.a'
  2.                         EXPORT                TRY:CODE
  3.                         EXPORT                CLEAR_JUMP_TRACE_BIT:CODE
  4.  
  5.  
  6.  
  7. ;•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  8. ;•                                                                           •
  9. ;•   Identifier:     TRY                                                     •
  10. ;•   -----------                                                             •
  11. ;•                                                                           •
  12. ;•       Description                                                         •
  13. ;•       -----------                                                         •
  14. ;•       This proc pushes the SLUDGE factor onto the stack and jumps to the  •
  15. ;•         parasite code.                                                          •
  16. ;•                                                                           •
  17. ;•       History                                                             •
  18. ;•       -------                                                             •
  19. ;•                                                                           •
  20. ;•       Author          Date            Description                         •
  21. ;•       ------------------------------------------------------------------  •
  22. ;•       Kevin McEntee   2/20/90         Original Implementation             •
  23. ;•                                                                           •
  24. ;•                                                                           •
  25. ;•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  26. TRY                            PROC
  27.                             Move.L            D0,-(SP)
  28.                             Move.L            A0,-(SP)
  29.                             Move.L            16(SP),D0
  30.                             Move.L            12(SP),A0        ; put parasite code in A0
  31.                             Move.L            D0,-(SP)
  32.                             Jsr                (A0)
  33.                             ;
  34.                             AddA.L            #4,A7            ; eat the Sludge Factor param
  35.                             Move.L            8(SP),A0        ; ra -> A0
  36.                             Move.L            A0,16(SP)        ; put return address at top of stack
  37.                             Move.L            (SP)+,A0        ; restore A0
  38.                             Move.L            (SP)+,D0
  39.                             AddA.L            #8,A7
  40.                             RTS
  41.                             ENDPROC
  42.                             
  43.                             
  44.                             
  45. CLEAR_JUMP_TRACE_BIT            PROC
  46.                                 Andi    #$BFFF,SR
  47.                                 RTS
  48.                                 ENDPROC
  49.                             END
  50.